<template>
  <div>
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <TodayRecommend></TodayRecommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for="floors in floorsList" :key="floors.id" :floors=floors></Floor>
    <Brand></Brand>
    <!-- <button @click="add">+1</button>
    <span>仓库的数据：{{ count }}</span>
    <button >-1</button> -->
  </div>
</template>

<script>
import ListContainer from "./ListContainer";
import TodayRecommend from "./TodayRecommend";
import Rank from "./Rank";
import Like from "./Like";
import Floor from "./Floor"
import Brand from "./Brand"
import { mapState } from 'vuex';
// import { mapState } from "vuex";

export default {
  name: "myHome",
  components: {
    ListContainer,
    TodayRecommend,
    Rank,
    Like,
    Floor,
    Brand
  },
  mounted() {
    this.$store.dispatch("floorsList");
  },
  computed: {
    ...mapState({
      floorsList: (state) => state.home.floorsList,
    }),
  },
  methods: {
    // add(){
    //    this.$store.dispatch('add')
    // }
  },
};
</script>

<style lang="scss" scoped>
</style>